$height){ if($width > 180){ $percent = 180 / $width; } }elseif($width < $height){ if($height > 135){ $percent = 135 / $height; } }else{ if($width > 180){ $percent = 180 / $width; } if($height > 135){ $percent = 135 / $height; } } if($percent > 0){ $new_width1 = $width * $percent; $new_height1 = $height * $percent; }else{ $new_width1 = $width; $new_height1 = $height; } } if(file_exists("$u2")){ $img2flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u2"); if($width > $height){ if($width > 180){ $percent = 180 / $width; } }elseif($width < $height){ if($height > 135){ $percent = 135 / $height; } }else{ if($width > 180){ $percent = 180 / $width; } if($height > 135){ $percent = 135 / $height; } } if($percent > 0){ $new_width2 = $width * $percent; $new_height2 = $height * $percent; }else{ $new_width2 = $width; $new_height2 = $height; } } if(file_exists("$u3")){ $img3flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u3"); if($width > $height){ if($width > 180){ $percent = 180 / $width; } }elseif($width < $height){ if($height > 135){ $percent = 135 / $height; } }else{ if($width > 180){ $percent = 180 / $width; } if($height > 135){ $percent = 135 / $height; } } if($percent > 0){ $new_width3 = $width * $percent; $new_height3 = $height * $percent; }else{ $new_width3 = $width; $new_height3 = $height; } } /* if(file_exists("$u1")){ unlink("$u1"); } if(file_exists("$u2")){ unlink("$u2"); } if(file_exists("$u3")){ unlink("$u3"); } if(file_exists("$u")){ rmdir("$u"); }*/ }else{ //MySQLに接続 if(!$conn = mysql_connect(_DB_SERVER,_DB_UID,_DB_PASS)){ die('MySQL接続失敗'); } //データベースの選択 if(!$sts = mysql_select_db(_DB_NAME,$conn)){ die('テーブル選択失敗'); } $artnum = $_GET['artnum']; $sql=""; $sql.="select * from album where artnum = '$artnum' group by artnum "; $mq = mysql_query($sql,$conn); if($rec = mysql_fetch_array($mq)){ $ownerid = _hs($rec['id']); $Rdata = _hs($rec['date']); $title = _hs($rec['title']); $category = _hs($rec['category']); $temp = _hs($rec['temp']); $com = _hs($rec['com']); $com = str_replace("
","\n",$com); $img1com = _hs($rec['img1com']); $img2com = _hs($rec['img2com']); $img3com = _hs($rec['img3com']); $img1name = _hs($rec['img1name']); $img2name = _hs($rec['img2name']); $img3name = _hs($rec['img3name']); $ex = _hs($rec['ex']); $nc = $rec['nc']; $weather = $rec['weather']; $Odate = _hs($rec['Odate']); $OY=substr($Odate,0,4);//年 $OM=substr($Odate,6,2);//月 $OD=substr($Odate,10,2);//日 $u = "${id}/"."${Rdata}"; $u1 = "${id}/"."${Rdata}/"."image1".".jpg"; $u2 = "${id}/"."${Rdata}/"."image2".".jpg"; $u3 = "${id}/"."${Rdata}/"."image3".".jpg"; if(file_exists("$u1")){ $img1flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u1"); if($width > $height){ if($width > 180){ $percent = 180 / $width; } }elseif($width < $height){ if($height > 135){ $percent = 135 / $height; } }else{ if($width > 180){ $percent = 180 / $width; } if($height > 135){ $percent = 135 / $height; } } if($percent > 0){ $new_width1 = $width * $percent; $new_height1 = $height * $percent; }else{ $new_width1 = $width; $new_height1 = $height; } } if(file_exists("$u2")){ $img2flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u2"); if($width > $height){ if($width > 180){ $percent = 180 / $width; } }elseif($width < $height){ if($height > 135){ $percent = 135 / $height; } }else{ if($width > 180){ $percent = 180 / $width; } if($height > 135){ $percent = 135 / $height; } } if($percent > 0){ $new_width2 = $width * $percent; $new_height2 = $height * $percent; }else{ $new_width2 = $width; $new_height2 = $height; } } if(file_exists("$u3")){ $img3flg=1; $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$u3"); if($width > $height){ if($width > 180){ $percent = 180 / $width; } }elseif($width < $height){ if($height > 135){ $percent = 135 / $height; } }else{ if($width > 180){ $percent = 180 / $width; } if($height > 135){ $percent = 135 / $height; } } if($percent > 0){ $new_width3 = $width * $percent; $new_height3 = $height * $percent; }else{ $new_width3 = $width; $new_height3 = $height; } } setcookie("Pmmp-Rdata",$Rdata,time()+60*60,"/prime/",".jhayashida.co.jp",0); } } $dateY=date("Y"); $dateM=date("n"); $dateD=date("j"); //MySQLに接続 if(!$conn = mysql_connect(_DB_SERVER,_DB_UID,_DB_PASS)){ die('MySQL接続失敗'); } //データベースの選択 if(!$sts = mysql_select_db(_DB_NAME,$conn)){ die('テーブル選択失敗'); } $sqllist=""; $sqllist.="select * from member where id = '$id' group by id"; $mqlist = mysql_query($sqllist,$conn); if($rec = mysql_fetch_array($mqlist)){ $blogtitle = $rec['blogtitle']; $ownerskin_id = $rec['skin_id']; } $sqllist=""; $sqllist.="select n_category from category where id = '$id' group by id"; $mqlist = mysql_query($sqllist,$conn); if($rec = mysql_fetch_array($mqlist)){ $l_category = $rec['n_category']; $l_category=explode("%$&$%","$l_category"); } //-----------------------レポートアップ処理--------------------------------------------- if(isset($_POST['Rsubmit'])){ $title=_ss(_hs($_POST['title'])); $category=_ss(_hs($_POST['category'])); $temp=_ss(_hs($_POST['temp'])); $com=_ss(_hs($_POST['com'])); $ex=_ss(_hs($_POST['ex'])); $OY=_ss(_hs($_POST['OY'])); $OM=_ss(_hs($_POST['OM'])); $OD=_ss(_hs($_POST['OD'])); $nc=$_POST['nc']; $weather=$_POST['weather']; $img1com=_ss(_hs($_POST['img1com'])); $img2com=_ss(_hs($_POST['img2com'])); $img3com=_ss(_hs($_POST['img3com'])); $img1 = $_FILES['img1']; //アップロードファイルオブジェクト $img1tmp = $_FILES['img1']['tmp_name']; //tmpファイル名 $img1name = $_FILES['img1']['name']; //ローカルファイル名 $img1size = $_FILES['img1']['size']; //サイズ $img1type = $_FILES['img1']['type']; //タイプ $img2 = $_FILES['img2']; //アップロードファイルオブジェクト $img2tmp = $_FILES['img2']['tmp_name']; //tmpファイル名 $img2name = $_FILES['img2']['name']; //ローカルファイル名 $img2size = $_FILES['img2']['size']; //サイズ $img2type = $_FILES['img2']['type']; //タイプ $img3 = $_FILES['img3']; //アップロードファイルオブジェクト $img3tmp = $_FILES['img3']['tmp_name']; //tmpファイル名 $img3name = $_FILES['img3']['name']; //ローカルファイル名 $img3size = $_FILES['img3']['size']; //サイズ $img3type = $_FILES['img3']['type']; //タイプ // $Rdata=date("YmdHis"); $Rdata = _ss(_hs($_COOKIE['Pmmp-Rdata'])); if($Rdata==""){ $Rdata=_ss(_hs($_POST['Rdata'])); } $error=array(); $errorflg1=""; $errorflg2=""; $errorflg3=""; $errorflg4=""; $errorflg5=""; $errorflg6=""; $errorflg7=""; $errorflg8=""; $errorflg9=""; $rotate1 = $_POST['rotate1']; $rotate2 = $_POST['rotate2']; $rotate3 = $_POST['rotate3']; //エラーチェック if($title==""){ $error[]="○タイトルが入力されていません。
対処法:タイトルを入力して下さい。"; $errorflg1="y"; } if($category=="" and $n_category==""){ $category="日記"; } if($n_category=="日記"){ $error[]="○入力されたカテゴリ名はすでに登録されております。
対処法:別のカテゴリ名を入力して下さい。"; $n_category=""; }else{ for($i=1;$l_category[$i]!="";$i++){ if($l_category[$i]==$n_category){ $error[]="○入力されたカテゴリ名はすでに登録されております。
対処法:別のカテゴリ名を入力して下さい。"; $n_category=""; } } } if($temp==""){ $temp="日記"; } if($com==""){ $error[]="○コメントが入力されていません。
対処法:コメントを入力して下さい。"; $errorflg2="y"; } $u1 = "${id}/"."${Rdata}/"."image1".".jpg"; $u2 = "${id}/"."${Rdata}/"."image2".".jpg"; $u3 = "${id}/"."${Rdata}/"."image3".".jpg"; /* if((!is_uploaded_file($img1tmp)) and ((is_uploaded_file($img2tmp)) or (is_uploaded_file($img3tmp)))){ if(!file_exists("$u1")){ $error[]="○写真1が選択されずに写真2または写真3が選択されました。
対処法:写真のアップは写真1から順に選んでください。"; $errorflg3="y"; } }elseif((is_uploaded_file($img1tmp)) and (!is_uploaded_file($img2tmp)) and (is_uploaded_file($img3tmp))){ if(!file_exists("$u1") and !file_exists("$u2")){ $error[]="○写真1と写真2が選択されずに写真3が選択されました。
対処法:写真のアップは写真1から順に選んでください。"; $errorflg3="y"; } } */ if($error[0]==""){ if($img1com!="" and (!is_uploaded_file($img1tmp))){ if(!file_exists("$u1")){ $error[] = "○写真1が選択されずに写真1用一言コメントが入力されています。
対処法:写真1を選択してから写真1用一言コメントを入力して下さい。"; $errorflg4="y"; } }elseif(is_uploaded_file($img1tmp)){ if($img1size < 10000000){ if(!ereg("(\.jpg)$|(\.jpeg)$|(\.JPG)$|(\.JPEG)$",$img1name)){ $error[] = "○写真1の拡張子がjpegまたはjpg以外の写真ファイルはアップ出来ません。"; $errorflg5="y"; }elseif(is_uploaded_file($img1tmp)){ srand(time()); $passchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $len = strlen($passchars); $i = 0; while($i < 15){ $IMGNAME1 .= substr($passchars,rand(0,$len - 1),1); $i++; } $u1 = "${id}/"."${Rdata}/"."img1"."$IMGNAME1".".jpg"; $_SESSION['Imgn1']=$u1; if(!file_exists("${id}/"."${Rdata}")){ mkdir("${id}/"."${Rdata}",0777); //シリアルナンバー名のフォルダ作成・属性(777) chmod("${id}/"."${Rdata}", 0777); } //写真サイズ自動変更処理 list($width, $height) = getimagesize($img1tmp); if($width > $height){ if($width > 640){ $percent = 640 / $width; } if($height > 480){ $percent = 480 / $height; } }elseif($width < $height){ if($height > 480){ $percent = 480 / $height; } }else{ if($width > 640){ $percent = 640 / $width; } if($height > 480){ $percent = 480 / $height; } } if($width > 640 or $height > 480){ $new_width = $width * $percent; $new_height = $height * $percent; $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($img1tmp); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); if($rotate1!=0){ $image_p = imagerotate($image_p, $rotate1, 0); } $boRtn=imagejpeg($image_p,$u1,100); }else{ $image = imagecreatefromjpeg($img1tmp); if($rotate1!=0){ $image_p = imagerotate($image, $rotate1, 0); $boRtn=imagejpeg($image_p,$u1,100); }else{ $boRtn=move_uploaded_file($img1tmp,$u1); } } if ($boRtn){ chmod("$u1", 0777); }else{ $error[] = "○写真1のアップロードに失敗しました。
対処法:写真1をもう一度選択し直して下さい。"; $errorflg5="y"; } } }else{ $error[] = "○写真1のサイズが大きすぎます。
対処法:アップ出来る写真の容量は500KBまでです。写真の容量を小さくして下さい。"; $errorflg5="y"; } }elseif($rotate1!=0){ $filename="${id}/"."${Rdata}/"."image1".".jpg"; srand(time()); $passchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $len = strlen($passchars); $i = 0; while($i < 15){ $IMGNAME1 .= substr($passchars,rand(0,$len - 1),1); $i++; } $filename2="${id}/"."${Rdata}/"."img1"."$IMGNAME1".".jpg"; $_SESSION['Imgn1']=$filename2; if(file_exists($filename)){ $source = imagecreatefromjpeg($filename); // 回転 $image_p = imagerotate($source, $rotate1, 0); // 出力 imagejpeg($image_p,$filename2,100); } } if($img2com!="" and (!is_uploaded_file($img2tmp))){ if(!file_exists("$u2")){ $error[] = "○写真2が選択されずに写真2用一言コメントが入力されています。
対処法:写真2を選択してから写真2用一言コメントを入力して下さい。"; $errorflg6="y"; } }elseif(is_uploaded_file($img2tmp)){ if($img2size < 10000000){ if(!ereg("(\.jpg)$|(\.jpeg)$|(\.JPG)$|(\.JPEG)$",$img2name)){ $error[] = "○写真2の拡張子がjpegまたはjpg以外の写真ファイルはアップ出来ません。"; $errorflg7="y"; }elseif(is_uploaded_file($img2tmp)){ srand(time()); $passchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $len = strlen($passchars); $i = 0; while($i < 15){ $IMGNAME2 .= substr($passchars,rand(0,$len - 1),1); $i++; } $u2 = "${id}/"."${Rdata}/"."img2"."$IMGNAME2".".jpg"; $_SESSION['Imgn2']=$u2; if(!file_exists("${id}/"."${Rdata}")){ mkdir("${id}/"."${Rdata}",0777); //シリアルナンバー名のフォルダ作成・属性(777) chmod("${id}/"."${Rdata}", 0777); } //写真サイズ自動変更処理 list($width, $height) = getimagesize($img2tmp); if($width > $height){ if($width > 640){ $percent = 640 / $width; } if($height > 480){ $percent = 480 / $height; } }elseif($width < $height){ if($height > 480){ $percent = 480 / $height; } }else{ if($width > 640){ $percent = 640 / $width; } if($height > 480){ $percent = 480 / $height; } } if($width > 640 or $height > 480){ $new_width = $width * $percent; $new_height = $height * $percent; $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($img2tmp); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); if($rotate2!=0){ $image_p = imagerotate($image_p, $rotate2, 0); } $boRtn=imagejpeg($image_p,$u2,100); }else{ $image = imagecreatefromjpeg($img2tmp); if($rotate2!=0){ $image_p = imagerotate($image, $rotate2, 0); $boRtn=imagejpeg($image_p,$u2,100); }else{ $boRtn=move_uploaded_file($img2tmp,$u2); } } if ($boRtn){ chmod("$u2", 0777); }else{ $error[] = "○写真2のアップロードに失敗しました。
対処法:写真2をもう一度選択し直して下さい。"; $errorflg7="y"; } } }else{ $error[] = "○写真2のサイズが大きすぎます。
対処法:アップ出来る写真の容量は500KBまでです。写真の容量を小さくして下さい。"; $errorflg7="y"; } }elseif($rotate2!=0){ $filename="${id}/"."${Rdata}/"."image2".".jpg"; srand(time()); $passchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $len = strlen($passchars); $i = 0; while($i < 15){ $IMGNAME2 .= substr($passchars,rand(0,$len - 1),1); $i++; } $filename2="${id}/"."${Rdata}/"."img2"."$IMGNAME2".".jpg"; $_SESSION['Imgn2']=$filename2; if(file_exists($filename)){ $source = imagecreatefromjpeg($filename); // 回転 $image_p = imagerotate($source, $rotate2, 0); // 出力 imagejpeg($image_p,$filename2,100); } } if($img3com!="" and (!is_uploaded_file($img3tmp))){ if(!file_exists("$u3")){ $error[] = "○写真3が選択されずに写真3用一言コメントが入力されています。
対処法:写真3を選択してから写真3用一言コメントを入力して下さい。"; $errorflg8="y"; } }elseif(is_uploaded_file($img3tmp)){ if($img3size < 10000000){ if(!ereg("(\.jpg)$|(\.jpeg)$|(\.JPG)$|(\.JPEG)$",$img3name)){ $error[] = "○写真3の拡張子がjpegまたはjpg以外の写真ファイルはアップ出来ません。"; $errorflg9="y"; }elseif(is_uploaded_file($img3tmp)){ srand(time()); $passchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $len = strlen($passchars); $i = 0; while($i < 15){ $IMGNAME3 .= substr($passchars,rand(0,$len - 1),1); $i++; } $u3 = "${id}/"."${Rdata}/"."img3"."$IMGNAME3".".jpg"; $_SESSION['Imgn3']=$u3; if(!file_exists("${id}/"."${Rdata}")){ mkdir("${id}/"."${Rdata}",0777); //シリアルナンバー名のフォルダ作成・属性(777) chmod("${id}/"."${Rdata}", 0777); } //写真サイズ自動変更処理 list($width, $height) = getimagesize($img3tmp); if($width > $height){ if($width > 640){ $percent = 640 / $width; } if($height > 480){ $percent = 480 / $height; } }elseif($width < $height){ if($height > 480){ $percent = 480 / $height; } }else{ if($width > 640){ $percent = 640 / $width; } if($height > 480){ $percent = 480 / $height; } } if($width > 640 or $height > 480){ $new_width = $width * $percent; $new_height = $height * $percent; $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($img3tmp); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); if($rotate3!=0){ $image_p = imagerotate($image_p, $rotate3, 0); } $boRtn=imagejpeg($image_p,$u3,100); }else{ $image = imagecreatefromjpeg($img3tmp); if($rotate3!=0){ $image_p = imagerotate($image, $rotate3, 0); $boRtn=imagejpeg($image_p,$u3,100); }else{ $boRtn=move_uploaded_file($img3tmp,$u3); } } if ($boRtn){ chmod("$u3", 0777); }else{ $error[] = "○写真3のアップロードに失敗しました。
対処法:写真3をもう一度選択し直して下さい。"; $errorflg9="y"; } } }else{ $error[] = "写真3のサイズが大きすぎます。
対処法:アップ出来る写真の容量は500KBまでです。写真の容量を小さくして下さい。"; $errorflg9="y"; } }elseif($rotate3!=0){ $filename="${id}/"."${Rdata}/"."image3".".jpg"; srand(time()); $passchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $len = strlen($passchars); $i = 0; while($i < 15){ $IMGNAME3 .= substr($passchars,rand(0,$len - 1),1); $i++; } $filename2="${id}/"."${Rdata}/"."img3"."$IMGNAME3".".jpg"; $_SESSION['Imgn3']=$filename2; if(file_exists($filename)){ $source = imagecreatefromjpeg($filename); // 回転 $image_p = imagerotate($source, $rotate3, 0); // 出力 imagejpeg($image_p,$filename2,100); } } } if($error[0]==""){ setcookie("Pmmp-title",$title,time()+60*60,"/prime/",".jhayashida.co.jp",0); setcookie("Pmmp-category",$category,time()+60*60,"/prime/",".jhayashida.co.jp",0); setcookie("Pmmp-n_category",$n_category,time()+60*60,"/prime/",".jhayashida.co.jp",0); setcookie("Pmmp-temp",$temp,time()+60*60,"/prime/",".jhayashida.co.jp",0); $_SESSION['com1']=$com; $_SESSION['snc']=$nc; $_SESSION['weather']=$weather; setcookie("Pmmp-img1com",$img1com,time()+60*60,"/prime/",".jhayashida.co.jp",0); setcookie("Pmmp-img2com",$img2com,time()+60*60,"/prime/",".jhayashida.co.jp",0); setcookie("Pmmp-img3com",$img3com,time()+60*60,"/prime/",".jhayashida.co.jp",0); $_SESSION['OY']=$OY; $_SESSION['OM']=$OM; $_SESSION['OD']=$OD; setcookie("Pmmp-Rdata",$Rdata,time()+60*60,"/prime/",".jhayashida.co.jp",0); setcookie("Pmmp-ex",$ex,time()+60*60,"/prime/",".jhayashida.co.jp",0); if(_S == 1){ header("Location: http://www.jhayashida.co.jp/prime/revmp2.php"); }elseif(_S == 0){ header("Location: http://localhost/public/prime/revmp2.php"); } exit; } } //-----------------------レポートアップ処理終了--------------------------------------------- ?> 12){ //月が13以上になったときの処理 $month -=12; $year += 1; } break; case 2 ; $year += 1; break; case 3 ; $year += 10; break; case 4 ; $year += 100; break; } setcookie("year",$year,time()+60*60); setcookie("month",$month,time()+60*60); mb_language("Ja") ; mb_internal_encoding("JIS") ; header('content-type: text/html; charset =' ._CHARSET); ?> マウスだけで簡単に作れる ブログワン

<<    年月    >>
SUN MON TUE WED THU FRI SAT
▼ 
エラー

";}?>
この記事の公開・非公開設定 >公開する    >公開しない    >限定公開する
">
タイトル  ">
※タイトルに付属した上記文面が記事のタイトルに自動で表示されるようになります。
記事の日付 
お天気 
お天気を選択すると、ブログを書いた日のお天気が絵文字で表示されます。
記事カテゴリ 
▼新しくカテゴリを追加する場合は
こちらにカテゴリ名を入力してください。
半角、全角、英数字ご使用可能 >
コメントを載せる 
写真1 
" border=0 width= height=>
 
回転しない
左に90度回転
180度回転
右に90度回転
写真1の一言コメント  ">
写真2
" border=0 width= height=>

回転しない
左に90度回転
180度回転
右に90度回転
写真2の一言コメント ">
写真3
" border=0 width= height=>

回転しない
左に90度回転
180度回転
右に90度回転
写真3の一言コメント ">
>この記事へのコメントを拒否する
※この記事へのコメントを拒否する場合にチェックを入れて下さい。
> >